package com.tianqicode.demo.dao.impl;

import com.tianqicode.demo.config.MySqlDatasource;
import com.tianqicode.demo.dao.ServiceDao;
import com.tianqicode.spring.beans.factory.DisposableBean;

public class ServiceDaoImpl implements ServiceDao, DisposableBean {

    private MySqlDatasource mySqlDatasource;

    public ServiceDaoImpl() {
    }

    @Override
    public String getData() {
        return "获取到了一些数据";
    }

    @Override
    public MySqlDatasource getMySqlDatasource() {
        return mySqlDatasource;
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("释放数据库资源");
    }
}
